﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Hxsoft.AppV1.Module;

namespace Hxsoft.AppV1.WebUI
{
	/// <summary>
	/// 文章摘要分页列表
	/// </summary>
	public class ArticleSummaryPagingList : ArticlePagingList
	{
		/// <summary>
		/// 摘要内容。
		/// </summary>
		public virtual string ItemSummary
		{
			get { return Eval("Summary", null); }
		}

		/// <summary>
		/// 获取文章摘要列表
		/// </summary>
		/// <returns></returns>
		public override object GetListData()
		{
			PaginationInfo<List<Articles.ModuleArticleForClientSummaryList>> pageInfo = Articles.GetPaginationSummaryList(SiteId,ModuleId, Keyword, CtrPager.PageSize, CurrentPage);
			CtrPager.RecordCount = pageInfo.RecordCount;
			CtrPager.CustomInfoHTML = GenericHelper.GetPagerCustomInfoHtml<List<Articles.ModuleArticleForClientSummaryList>>(pageInfo);
			return pageInfo.Records;
		}
	}
}
